package com.example.aigc_education.domain.request;

import com.example.aigc_education.enums.PaperDifficultyType;
import com.example.aigc_education.validation.EnumValid;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class AddQuizzesRequest implements Serializable {
    private String executeId;

    @NotNull(message = "主题id不能为空")
    private Long themeId;

    @NotEmpty(message = "测验名称不能为空")
    private String paperName;

    @NotEmpty(message = "难度不能为空")
    // 简单/中等/困难
    private String difficulty;

    private List<Quiz> quizzes;

    @Data
    public static class Quiz implements Serializable {

        @NotEmpty(message = "问题不能为空")
        private String question;

        @NotNull(message = "选项不能为空")
        @NotEmpty(message = "答案不能为空")
        private List<String> answer;

        @NotNull(message = "选项不能为空")
        @NotEmpty(message = "选项不能为空")
        private List<String> options;


        @NotEmpty(message = "解释不能为空")
        private String explanation;

        @NotEmpty(message = "问题类型不能为空")
        @JsonProperty("question_type")
        private String questionType;
    }
}
